import Label = Laya.Label;
import Loader = Laya.Loader;
import Sprite = Laya.Sprite;
import RoleDlg = ui.role1.RoleDlg;

//初始化微信小游戏
Laya.MiniAdpter.init();
//程序入口
Laya.init(640, 1136, laya.webgl.WebGL);
Laya.stage.scaleMode = Laya.Stage.SCALE_EXACTFIT;
//激活资源版本控制
Laya.ResourceVersion.enable("version.json", Handler.create(null, beginLoad), Laya.ResourceVersion.FILENAME_VERSION);

function beginLoad(){
	let uiResArry = [
            { url: "res/atlas/enemy.atlas", type: Laya.Loader.ATLAS },
            { url: "res/atlas/map.atlas", type: Laya.Loader.ATLAS },
			{ url: "res/atlas/comp.atlas", type: Laya.Loader.ATLAS }
        ];
 	Laya.loader.load(uiResArry, Laya.Handler.create	(null, onLoaded));
}

function onLoaded(): void {
	//实例UI界面
	testUI = new TestUI();
	
}